home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / sharedSV / SvManipList.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.5 KB  |  81 lines

  1. /*
  2.  * Copyright (c) 1991, 1992 Silicon Graphics, Inc.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that the name of Silicon Graphics may not be used in any advertising or
  7.  * publicity relating to the software without the specific, prior written
  8.  * permission of Silicon Graphics.
  9.  *
  10.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  11.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
  12.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  13.  *
  14.  * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  15.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
  16.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE
  17.  * POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
  18.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  19.  */
  20.  
  21. //  -*- C++ -*-
  22.  
  23. /*
  24.  * Copyright (C) 1990,91,92   Silicon Graphics, Inc.
  25.  *
  26.  _______________________________________________________________________
  27.  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
  28.  |
  29.  |   $Revision: 1.1000 $
  30.  |
  31.  |   Classes:    SvManipList
  32.  |
  33.  |   Author(s):    David Mott
  34.  |
  35.  ______________  S I L I C O N   G R A P H I C S   I N C .  ____________
  36.  _______________________________________________________________________
  37.  */
  38.  
  39. #ifndef  _SV_MANIP_LIST_
  40. #define  _SV_MANIP_LIST_
  41.  
  42.  
  43. // This class helps keep track of path,manipulator pairs.
  44.  
  45. class SbPList;
  46. class SoPath;
  47. class SoManipulator;
  48.  
  49. // You can add a path/manipulator pair to the list.
  50. // Methods let you find the index of this pair based on either
  51. // the path or the manip. You can then use the index to get the
  52. // manip or the path, or remove the pair from the list.
  53.  
  54. class SvManipList {
  55.   public:
  56.     SvManipList();
  57.     ~SvManipList();
  58.     
  59.     int            getLength() const;
  60.  
  61.     // append will ref() the path and the manip
  62.     void        append(SoPath *p, SoManipulator *m);
  63.     
  64.     // return the index of the path/manip pair.
  65.     // use this index in calls to remove(), getPath(), getManip()
  66.     int            find(SoPath *p) const;
  67.     int            find(SoManipulator *m) const;
  68.     
  69.     // remove will unref() the path and the manip
  70.     void        remove(int which);
  71.     
  72.     // these return the path and the manip.
  73.     SoPath *        getPath(int which) const;
  74.     SoManipulator * getManip(int which) const;
  75.   
  76.   private:
  77.     SbPList *        list;
  78. };
  79.  
  80. #endif // _SV_MANIP_LIST_
  81.